.TH TiMidity++ 1 "Nov 10 2001" "2.11.0"
.SH NAME
TiMidity++ \- MIDI to WAV converter and player
.SH SYNOPSIS
.B timidity
[\-options] filename [filenames ...]
.SH DESCRIPTION
TiMidity++ is a converter that converts some of MIDI files
(supported formats: Standard MIDI files (*.MID), Recomposer files (*.RCP, *.R36,
*.G18, *.G36) and Module files (*.mod)) into formatted audio files
(e.g. RIFF WAVE).
TiMidity uses Gravis Ultrasound\-compatible patch files or
Soundfonts (*.sfx, *.sf2) to generate digital audio data from MIDI files.
The digital audio data generated by TiMidity can be stored in a file for
processing, or played in real time through an audio device.
.br
In real time playing, TiMidity can show the lyrics contained
in KAR or WRD files.
.SH FILENAME
You can use the following expressions as the \fBfilename\fP
argument:
.TP
.B \-
Read a MIDI file from standard input.
.TP
.B /path/filename
Read a MIDI file from the specified path on a filesystem.
.TP
.BI dir: "directory"
.br
.ns
.TP
.B directory/
Read and play all MIDI files in the specified directory.
.TP
.B Archive File
Extract and play the file(s) in the archive.
If you want to specify a certain MIDI file in the archive,
append \fI#<MIDI\-filename>\fP to the archive name.
The expression after \fI#\fP can use regular expressions
(case insensitive).

.RS
For example:
.TP
.B timidity "'file.zip#file.mid'"
Plays file.mid in file.zip
.TP
.B timidity "'file.lzh#*.mid'"
Plays any files that match the regular expression '*.mid' in file.zip
.TP
.B timidity "'file.tgz#*'"
This expression is the same as
.br
\fBtimidity 'file.tgz'\fP
.PP
Since these mechanism are contained in TiMidity itself,
you can use this syntax even in the MS Windows environment.
.PP

TiMidity can handle the following archive formats:
.RS
.TP
\fBtar\fP (*.tar)
.TP
\fBtar + gzip\fP (*.tar.gz, *.tgz)
.TP
\fBzip\fP (*.zip)
.TP
\fBlzh\fP (*.lzh, *.lha)
(lh0, lh1, lh2, lh3, lh4, lh5, lh6, lzs, lz5, lz4 are available)
.RE
.RE

.TP
.B news://news\-server[:port]/Message\-ID
.br
.ns
.TP
.B news://news\-server[:port]/newsgroup[/first\-last]
Play the MIDI file in the specified article on the news server.
If a newsgroup is specified TiMidity plays all MIDI files found
in any article posted to that newsgroup.
.br
TiMidity parses MIME Multi\-part messages.
.br
The following MIME\-types are allowed:
.RS
.TP
.B uuencoded file
"begin" is required
.TP
.B base64 encoded
"Content\-Transfer\-Encoding\: base64" is required
.TP
.B quoted\-string
"Content\-Transfer\-Encoding\: quoted\-string" is required
.TP
.B Mac BinHex format
only 'HQX' format is available
.RE

.TP
.B http://url
.br
.ns
.TP
.B ftp://url
Play the file specified in the URL.
.sp
For example:

"timidity http://www.goice.co.jp/member/mo/dist/midi/impromptu.mid"

.br
plays the specified MIDI\-file directly from the network.
.sp
If these expression are used in the *.cfg files, you can even use
patch\-files (and others) from remote machines.

.P
.SH INPUT FILE
Timidity can handle the following file formats:
.TP
\fB .MID\fP (Format 0, 1, 2)
Standard MIDI File
.TP
\fB .RCP, .R36, .G18, .G36\fP (Recomposer formats (product of COME ON MUSIC co.))
The Windows version converts these with \fIrcpcv.dll\fP.
.TP
\fB .KAR\fP (Karaoke format)
Displays the lyrics as a Lyric Meta Event message.
.TP
\fB .MOD, MOD.*\fP (module file)
.TP
\fB .WRD\fP (WRD format)

.P
.SH OPTIONS
The following command line options are accepted by TiMidity:

.TP
.B \-A \fIamplification\fP
Multiplies the master volume by \fIamplification\fP %.
Default value is 70%.
Higher amplification makes louder sounds.
The allowed values of amplification range from 0 to 800%.

.TP
.B \-a
Turns on antialiasing.  Samples are run through a
lowpass filter before playing, which reduces aliasing
noise at low resampling frequencies.

.TP
.B \-B \fIfragments\fP[,\fIbuffer-bits\fP]
For the Linux/FreeBSD/OSS/ALSA/Windows sound driver,
selects the number of
buffer fragments in interactive mode.  Increasing
the number of fragments may reduce choppiness when
many processes are running.  It will make TiMidity
seem to respond sluggishly to fast forward, rewind,
and volume controls, and it will throw the status
display off sync.  Specify a fragments number of 0 to use
the maximum number of fragments available.

.TP
.B \-b \fImode\fP
(obsoleted)
.RE

.TP
.BI \-C " ratio"
Sets the ratio of sampling and control frequencies.
This determines how often envelopes are recalculated
-- small ratios yield better quality but use
more CPU time.

.TP
.BI \-c " filename"
Reads an extra configuration file.

.TP
.BI \-D " channel"
Marks channel as a drum channel.  If channel is
negative, channel -channel is marked as an instru-
mental channel.  If channel is 0, all channels are
marked as instrumental.

.TP
.BI \-d " dir"
Specifies the directory containing installed dynamic-link interface modules.

.TP
.B \-e
Make TiMidity evil.  For the Win32 version, this
increases the task priority by one.  It can give
better playback when you switch tasks at the
expense of slowing all other tasks down.

.TP
.BI \-E " mode"
Set TiMidity extend modes.  The following modes are available
(capitalized switch means disable this feature):
.RS
.TP
.B w/W
Enable/disable modulation controlling.
.TP
.B p/P
Enable/disable portamento controlling.
.TP
.B v/V
Enable/disable NRPM vibration.
.TP
.B s/S
Enable/disable channel pressure controlling.
.TP
.B t/T
Enable/disable tracing all Text Meta Events.
.TP
.B o/O
Accept/reject pronouncing multiple same notes.
.TP
.BI m " HH"
Sets the manufacturer ID to \fIHH\fP (where \fIHH\fP are two hex-digits).
.br
\fIHH\fP values of \fIGM/gm\fP, \fIGS/gs\fP or \fIXG/xg\fP
are understood as \fI41\fP, \fI43\fP and \fI7e\fP respectively.
.TP
.BI b " n"
Use tone bank \fIn\fP as the default.
.TP
.BI B " bank"
Sets the bank number of all channels to \fIbank\fP.
.TP
.BI F " args"
For effects.  See below.
.RE

.TP
.B \-F
Turns on fast panning to accommodate MIDI pieces
that expect panning adjustments to affect notes
that are already playing.  Some files that don't
expect this have a habit of flipping balance
rapidly between left and right, which can cause
severe popping when the -F flag is used.
.br
In the current version of TiMidity this option is a toggle.

.TP
.B \-f
Toggles fast envelopes.  This option makes TiMidity faster
but the release time of the notes are shortened.

.TP
.BI \-g " sec"
Open the Sound-Spectrogram window.  This option is activated if
the system has support for the X Window System.

.TP
.B \-h
Show the help message.

.TP
.BI \-I " voice" [/c]
Use the program number as the default instrument.
Any Program Change events in MIDI files will override
this option.
.br
If \fIvoice\fP is followed by \fI/c\fP the default program number
of the channel \fIc\fP is specified by \fIvoice\fP.

.TP
.BI \-i " interface"
Selects the user interfaces from the compiled\-in
alternatives.  \fIinterface\fP must be begun with one of the
supported interface identifiers.  Run TiMidity with
the \-h option to see a list.  The following identifiers
may be available:
.RS
.TP
.B \-id
dumb interface
.TP
.B \-in
ncurses interface
.TP
.B \-is
S-Lang interface
.TP
.B \-ia
X Athena Widget interface
.TP
.B \-ik
Tcl/Tk interface
.TP
.B \-im
Motif interface
.TP
.B \-iT
vt100 interface
.TP
.B \-ie
Emacs interface (use \fBM\-x timidity\fP in \fIEmacs\fP)
.TP
.B \-ii
skin interface
.br
Environment variable \fBTIMIDITY_SKIN\fP must be set to
the path of the skin data (compressed data are also supported).
.TP
.B \-ig
GTK interface
.TP
.B \-ir
Launch timidity as MIDI server.
.TP
.B \-iA
Launch timidity as ALSA sequencer client.
.br
.TP
.B Interface options
Option characters may be added immediately
after the interface identifier.  The following
options are recognized:
.PP
.TP
.B v
Increases verbosity level.  This option is cumulative.
.TP
.B q
Decreases verbosity level.  This option is cumulative.
.TP
.B t
Toggles trace mode.  In trace mode,
TiMidity attempts to display its
current state in real time.  For the
Linux sound driver, this is accomplished
through the use of short DMA
buffer fragments, which can be tuned
via the -B option.
.TP
.B l
Loop playing (some interfaces ignore this option)
.TP
.B r
Randomize file list arguments before playing
.TP
.B s
Sort file list arguments before playing
.RE

.TP
.B \-j
Enable the loading of patch files during play.

.TP
.B \-k " msec"
Specify audio queue time limit to reduce voices.
If the remaining audio buffer is less than \fImsec\fP milliseconds,
TiMidity tries to kill some voices.
This feature makes it possible to play complicated MIDI files on slow CPUs.
Setting \fImsec\fP to zero tells TiMidity to never remove any voices.

.TP
.B \-L " directory"
Adds \fIdirectory\fP to the library path.  Patch, configuration,
and MIDI files are searched along this
path.  Directories added last will be searched
first.  Note that the current directory is always
searched first before the library path.

.TP
.BI \-m " time"
Modify envelope volume decay time.  \fItime\fP is the minimum
number of milliseconds to sustain a sustained note.
.RS
.TP
.B \-m 1
Effectively behaves as if all sustains are ignored, volume ramping is
the same as normal stage 3.
.TP
.B \-m 0
Disable sustain ramping, causes constant volume sustains (default).
.TP
.B \-m 3000
A note at full volume will decay for 3 seconds once it begins
to be sustained (assuming the regular stage 3 rate would not
cause it to decay even longer).  Softer notes will of course 
die sooner.
.RE

.TP
.BI \-n " degree"
Enables Noise Shaping Filter.  \fIdegree\fP ranges from
\fI0\fP (min) to \fI4\fP (max).

.TP
.BI \-O " mode"
Selects the output mode from the compiled-in alternatives.
mode must begin with one of the supported
output mode identifiers.  Run TiMidity with the -h
option to see the list.  The following identifiers
are available in all versions:
.RS
.TP
.B \-Od
Outputs via audio device (default)
.TP
.B \-Or
Generate raw waveform data.  All format
options are supported.  Common formats
include:
.RS
.TP
.B \-OrU
uLaw
.TP
.B \-Or1sl
16-bit signed linear PCM
.TP
.B \-Or8ul
8-bit unsigned linear PCM
.RE
.TP
.B \-Ou
Generate Sun Audio (au) data
.TP
.B \-Oa
Generate AIFF data
.TP
.B \-Ow
Generate RIFF WAVE format output.  If output
is directed to a non-seekable file, or if
TiMidity is interrupted before closing the
file, the file header will contain 0xFFFFFFFF in the RIFF and data
block length fields.  The popular sound conversion utility \fIsox\fP
is able to read such malformed files, so you can pipe data directly to
sox for on\-the\-fly conversion to other formats.
.TP
.B "Format options"
Option characters may be added immediately after the mode identifier
to change the output format.  The following options are recognized:
.RS
.LP
.TP
.B 8
8-bit sample width
.TP
.B 1
6-bit sample width
.TP
.B l
Linear encoding
.TP
.B U
uLaw (8-bit) encoding
.TP
.B M
Monophonic
.TP
.B S
Stereo
.TP
.B s
Signed output
.TP
.B u
Unsigned output
.TP
.B x
Byte-swapped output
.RE
.LP
Note that some options have no effect on some modes.  For example, you
cannot generate a byte-swapped RIFF WAVE file, or force uLaw output on
a Linux PCM device.
.RE
.LP
.TP
.BI \-o " filename"
Place output on \fIfilename\fP, which may be a file, device, or HP-UX
audio server, depending on the output mode selected with the \fB\-O\fP
option.  The special filename ``\-'' causes output to be placed on
stdout.

.TP
.BI \-P
Use patch file for all programs.

.TP
.BI \-p " voices"
Sets polyphony (maximum number of simultaneous voices) to
\fIvoices\fP.

.TP
.BI \-p " a"
Toggle automatic polyphony reduction.

.TP
.BI \-Q " channel"
Causes \fIchannel\fP to be quiet.
If \fIchannel\fP is negative, channel \-\fIchannel\fP is turned back on.
If \fIchannel\fP is 0, all channels are turned on.

.TP
.BI \-q " m/n"
Specify audio buffer in seconds.
m: maximum size of buffer, n: percentage filled at the beginning
(default is 5.0/100%)
(size of 100% equals the whole device buffer size)

.TP
.BI \-R " n"
Enables Pseudo Reverb Mode.
It sets every instrument's release to n ms.  If n=0, n is set to 800 (default).
.RE

.TP
.BI \-S " size"
Sets the re-sample cache size to \fIsize\fP bytes.
If \fIsize\fP equals 0 any sample caches are disabled.
The default value of \fIsize\fP is 2097152 (2MB).

.TP
.BI \-s " frequency"
Sets the resampling frequency (\fBHz\fP or \fBkHz\fP).
Not all sound devices are capable of all frequencies -- an approximate
frequency may be selected, depending on the implementation.

.TP
.BI -t " code"
Sets output coding of Japanese text.  Possible values of \fIcode\fP are:
.RS
.TP
.B auto
determined by the \fILANG\fP environment variable.
.TP
.B ascii
Translates non-ASCII code to period.
.TP
.B nocnv
No conversion.
.TP
.B 1251
Convert from windows-1251 to koi8-r.
.TP
.B euc
Outputs EUC (Japan) coding.
.TP
.B jis
Outputs JIS coding.
.TP
.B sjis
Outputs SJIS coding.
.RE

.TP
.BI \-T " n"
Adjust tempo to n%; 120=play MOD files with an NTSC Amiga's timing.

.TP
.B \-U
Unload all instruments from memory between MIDI files.
This can reduce memory requirements when playing many
files in succession.

.TP
.BI \-w " mode"
Extended mode for MS Windows.  The following options are available:
.RS
.TP
.BI \-w "r"
Use \fIrcpcv.dll\fP to play RCP/R36 files.
.TP
.BI \-w "R"
Do not use \fIrcpcv.dll\fP (default).
.RE

.TP
.BI \-W " mode"
Play WRD file.
Allowed values of \fImode\fP are:
.RS
.TP
.B x
X Window System mode
.TP
.B t
TTY mode
.TP
.B d
Dumb mode (outputs WRD events directory)
.TP
.B \-
do not trace WRD
.RE
WRD mode must also use trace mode (option \fB\-i?t\fP) or
the timing of the WRD events will be terrible.

.TP
.B \-WR[opts]
Sets WRD options:
.RS
.TP
.B a1=b1,a2=b2, ...
Sets the WRD options.  \fBan\fP is the name of option and \fBbn\fP is the
value.
.TP
.BI d="n"
Emulates timing (\fB@WAIT\fP,\fB@WMODE\fP) bugs of the original MIMPI player.
The emulation levels are:
.RS
.TP
.B -WRd=0
do not emulate any bugs of MIMPI
.TP
.B -WRd=1
only emulate some bugs (default)
.TP
.B -WRd=2
emulate all known bugs
.RE

.TP
.BI F="filename"
Use \fIfilename\fP as WRD file only no file matching *.wrd is found.
.TP
.BI f="filename"
Uses \fIfilename\fP as WRD file.
.RE

.TP
.BI \-x " string"
Configure TiMidity with \fIstring\fP.  The format of \fIstring\fP
is the same as timidity.cfg.
.br

For example:
.br
\fB\-x'bank 0\\n0 violin.pat'\fP
.br
Sets the instrument number 0 to violin.

Character \fB\\\fP (Ascii 0x5c) in the \fIstring\fP is treated
as escape character like in C literals.  For example \fB\\n\fP is treated
as carriage return.
.RE

.TP
.BI \-Z " file"
Cause the table of frequencies to be read from \fIfile\fP.  This is
useful to define a tuning different from the occidental temperate scale.

.P
.SH EFFECT OPTIONS
In \fI-EF <arg>\fP option, you can specify following effect options:
.br
.RS
.TP
.BI -EFdelay= "l"
Left delay.
.TP
.BI -EFdelay= "r"
Right delay.
.TP
.BI -EFdelay= "b"
Swap left & right.
.TP
.BI -EFdelay= "0"
Disabled delay effect.
.TP
.BI -EFchorus= "1[,level]"
Enable MIDI chorus effect control.
.br
The optional parameter `level' specifies the chorus level [0..127]
.TP
.BI -EFchorus= "2[,level]"
Surround sound, chorus detuned to a lesser degree (default).
.br
The optional parameter `level' specifies the chorus level [0..127].
.TP
.BI -EFreverb= "0"
Disable MIDI reverb effect control.
.TP
.BI -EFreverb= "1[,level]"
Enable MIDI reverb effect control.
.br
The optional parameter `level' specifies the reverb level [0..127]
This effect is only available in stereo (default).
.TP
.BI -EFreverb= "2"
Global reverb effect.
.TP
.BI -EFns= "n"
Enable the n th degree noiseshaping filter.  Valid values of n are in the
interval [0..4].
.br
This effect is only available for 8-bit linear encoding
.RE

.P
.SH SEE ALSO
lsmidiprog(1), mididump(1), patinfo(1), sf2text(1), wav2pat(1), timidity.cfg(5)

.P
.SH COPYRIGHT
Copyright (C) 1999-2002 Masanao Izumo <mo@goice.co.jp>
Copyright (C) 1995 Tuukka Toivonen <tt@cgs.fi>
.P
The original version was developed by Tuukka Toivonen
<tt@cgs.fi> until the release of TiMidity-0.2i.  His development was
discontinued because of his being busy with work.
.P
This program is free software; you can redistribute it and/or modify
it under the terms of the \fIGNU General Public License\fP as published by
the Free Software Foundation; either version 2 of the License, or (at
your option) any later version.
.P
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the \fIGNU
General Public License\fP for more details.
.P
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA


.SH AVAILABILITY
The latest release is available on the TiMidity++ Page,
.br
URL http://www.goice.co.jp/member/mo/timidity/
.br

.SH BUGS
8-bit and low-rate output sounds worse than it should.
.P
Eats more CPU time than a small CPU-time-eating animal.
.P
This man page was translated from Japanese to English by me with
poor English skill :-)

.P
.SH AUTHORS
\fBVersion 0.2i and earlier:\fP
.br
Tuukka Toivonen <toivonen@clinet.fi>
.br
Vincent Pagel <pagel@loria.fr>
.br
Takashi Iwai <iwai@dragon.mm.t.u-tokyo.ac.jp>
.br
Davide Moretti <dmoretti@iper.net>
.br
Chi Ming HUNG <cmhung@insti.physics.sunysb.edu>
.br
Riccardo Facchetti <riccardo@cdc8g5.cdc.polimi.it>
.P
\fBTiMidity++:\fP
.br
IZUMO Masanao <mo@goice.co.jp>
.br
HARADA Tomokazu <harada@prince.pe.u-tokyo.ac.jp>
.br
YAMATE Keiichirou <keiich-y@is.aist-nara.ac.jp>
.br
KIRYU Masaki <mkiryu@usa.net>
.br
AOKI Daisuke <dai@y7.net>
.br
MATSUMOTO Shoji <shom@i.h.kyoto-u.ac.jp>
.br
KOYANAGI Masaaki <koyanagi@okilab.oki.co.jp>
.br
IMAI Kunihiko <imai@leo.ec.t.kanazawa-u.ac.jp>
.br
NOGAMI Takaya <t-nogami@happy.email.ne.jp>
.br
WATANABE Takanori <takawata@shidahara1.planet.kobe-u.ac.jp>
.br
TAKEKAWA Hiroshi <sian@big.or.jp>
.br
NAGANO Daisuke <breeze.geo@geocities.co.jp>
.br
YAMAHATA Isaku <yamahata@kusm.kyoto-u.ac.jp>
.br
KINOSHITA kosuke <kino@krhm.jvc-victor.co.jp>
.br
ARAI Yoshishige <ryo2@on.rim.or.jp>
.br
Glenn Trigg <ggt@netspace.net.au>
.P
and other many people sent information and bug\-fixes.
.P

The english version of this man page was written by
NAGANO Daisuke breeze.nagano@nifty.ne.jp>.
.br
If you have any comments or suggestions or complaints :) about this man page,
please tell me it.
